require("../../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pagesA/pages/mallA/mallindex" ], {
    "0744": function(e, i, c) {
        (function(r) {
            Object.defineProperty(i, "__esModule", {
                value: !0
            }), i.default = void 0;
            var e, o = (e = c("a34a")) && e.__esModule ? e : {
                default: e
            };
            function l(t, e, a, n, i, o, r) {
                try {
                    var d = t[o](r), l = d.value;
                } catch (t) {
                    return a(t), 0;
                }
                d.done ? e(l) : Promise.resolve(l).then(n, i);
            }
            function a(d) {
                return function() {
                    var t = this, r = arguments;
                    return new Promise(function(e, a) {
                        var n = d.apply(t, r);
                        function i(t) {
                            l(n, e, a, i, o, "next", t);
                        }
                        function o(t) {
                            l(n, e, a, i, o, "throw", t);
                        }
                        i(void 0);
                    });
                };
            }
            var d = getApp(), n = {
                data: function() {
                    return {
                        warn_num: r.getStorageSync("userinfo").s_1_num,
                        module_name: d.globalData.module_name,
                        sharetitle: "",
                        waimaidaohangcurrent: 0,
                        waimaidaohang_1: [],
                        waimaidaohang_2: [],
                        waimaidaohang_3: [],
                        waimaidaohang_4: [],
                        waimaittnew_daohang_height: 0,
                        sharepic: "",
                        appid_type: 0,
                        movietype: 1,
                        moviecometype: 1,
                        movielist: [],
                        moviecomelist: [],
                        movie_hotshuliang: 0,
                        qudao_tkl: "",
                        is_qudao_tkl: 0,
                        showAlert_taobaoauth: !1,
                        showAlert_login: !1,
                        elm_url: [],
                        meituan_url: [],
                        wxCode: "",
                        userinfo: [],
                        swiperItems: [],
                        waimaidaohang: [],
                        waimailist: [],
                        setting: [],
                        showAlert_meituan: !1,
                        kwd: "",
                        showAlert: !1,
                        currentCateIndex: 0,
                        leftTo: "cate1",
                        productListTo: "",
                        mainCate: [],
                        allProducts: [],
                        allProducts_temp: [],
                        mainHeight: 500,
                        scrollTimer: null,
                        contact_title: "",
                        contact_title_text: "",
                        contact_title_desc: "",
                        contact_id: "",
                        contact_type: "",
                        contact_thumb: "",
                        youlikes: [],
                        indexCateAndProducts: [],
                        top: 0,
                        footerCurrent: 0,
                        showToast_login: !1,
                        pageKey: 0,
                        height: "",
                        tabBar: [],
                        elmwm_act_id: 0,
                        mtpic: 0,
                        cityid: 40,
                        cityCode: 500100,
                        lat: 0,
                        lon: 0,
                        navItems: [],
                        navids: [],
                        navIndex: 0,
                        navType: "",
                        mallpage: 1,
                        mallpagesize: 20,
                        mallgoodslist: [],
                        loadStatus: "loadmore",
                        loadText: {
                            loadmore: "上拉加载更多",
                            loading: "努力加载中",
                            nomore: "实在没有了"
                        },
                        scrollTop: 0,
                        windowHeight: r.getStorageSync("windowHeight"),
                        navQuery: "",
                        header_background: "",
                        search_width: "",
                        isFixed: !1,
                        headerHeight: 0,
                        nav_margin_top: "15rpx",
                        nav_padding_top: "0rpx",
                        search_height: "",
                        keyword: "",
                        search_placeholder: "",
                        fixed_heiht: 0,
                        mall_nav: [],
                        api_url: 0,
                        ad_banner: [],
                        ad_banner_list: [],
                        ad_banner_list2: [],
                        current_bannerid: 0,
                        banner_color: "",
                        swiper_color: "",
                        back_text_style: {
                            color: "#ffffff"
                        },
                        mall_type: "",
                        cateid: "",
                        mall_type_name: "",
                        appid: "",
                        path: "",
                        search_id: "",
                        uid: 0,
                        is_all: 0,
                        navchange: 0
                    };
                },
                components: {
                    gracePage: function() {
                        c.e("graceUI/components/gracePage").then(function() {
                            return resolve(c("1021"));
                        }.bind(null, c)).catch(c.oe);
                    },
                    graceSwiper: function() {
                        c.e("graceUI/components/graceSwiper").then(function() {
                            return resolve(c("9fc3"));
                        }.bind(null, c)).catch(c.oe);
                    },
                    graceImg: function() {
                        c.e("graceUI/components/graceImg").then(function() {
                            return resolve(c("1d6e"));
                        }.bind(null, c)).catch(c.oe);
                    },
                    graceNavBar: function() {
                        c.e("graceUI/components/graceNavBar2").then(function() {
                            return resolve(c("e74d"));
                        }.bind(null, c)).catch(c.oe);
                    }
                },
                props: {},
                onReady: function() {
                    var e = this;
                    return a(o.default.mark(function t() {
                        return o.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, e.$onLaunched;

                              case 2:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }))();
                },
                onReachBottom: function() {
                    "nomore" != this.loadStatus && this.loadMallgoodslist();
                },
                onShow: function(t) {
                    var n = this;
                    return a(o.default.mark(function t() {
                        var e, a;
                        return o.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, n.$onLaunched;

                              case 2:
                                if ("undefined" != n.tabBar.list) for (e = 0; e < n.tabBar.list.length; e++) -1 != n.tabBar.list[e].url.indexOf("index/index") && (n.pageKey = e);
                                r.getStorageSync("openid") && (a = d.globalData.util.url("entry/wxapp/api", {
                                    m: d.globalData.module_name,
                                    o: "chkpid"
                                }), r.request({
                                    url: a,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: r.getStorageSync("openid")
                                    },
                                    success: function(t) {
                                        t = d.globalData.crypt.Decrypt(t.data.data.data, t.data.data.key), t = JSON.parse(t);
                                        r.setStorageSync("pid_use_time", t), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && (r.setStorageSync("elmwm_url", ""), 
                                        r.setStorageSync("elmsc_url", ""), r.setStorageSync("elmwmposter", ""), r.setStorageSync("elmscposter", ""), 
                                        r.setStorageSync("pid_time", r.getStorageSync("pid_use_time")));
                                    }
                                })), n.windowHeight = r.getStorageSync("windowHeight");

                              case 7:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }))();
                },
                onPullDownRefresh: function() {
                    this.cateid = "", this.navIndex = 0, this.mallpage = 1, this.mallpagesize = 20, 
                    this.loadMallgoodslist();
                },
                onPageScroll: function(t) {
                    var e = this;
                    0 == this.headerHeight && r.createSelectorQuery().select("#navheader").fields({
                        size: !0
                    }, function(t) {
                        t && (e.headerHeight = t.height);
                    }).exec(), this.scrollTop = t.scrollTop, r.createSelectorQuery().select("#scroll").boundingClientRect(function(t) {
                        t && (e.fixed_heiht = t.height);
                    }).exec(), 100 < this.headerHeight && t.scrollTop >= this.headerHeight ? (this.isFixed = !0, 
                    this.nav_margin_top = r.getStorageSync("headerHeight") + "px", this.nav_padding_top = "15rpx") : (this.isFixed = !1, 
                    this.nav_margin_top = "15rpx", this.nav_padding_top = "0rpx");
                },
                onLoad: function(n) {
                    var i = this;
                    return a(o.default.mark(function t() {
                        var e, a;
                        return o.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, i.$onLaunched;

                              case 2:
                                r.showLoading({
                                    title: "加载中...",
                                    mask: !1
                                }), (e = i).setting = r.getStorageSync("setting"), e.tabBar = r.getStorageSync("tabbar"), 
                                e.userinfo = r.getStorageSync("userinfo"), e.search_placeholder = e.setting.index_search_placeholder || "搜索商品标题，先领券再购买", 
                                a = wx.getMenuButtonBoundingClientRect(), e.search_width = r.upx2px(500) + "px", 
                                e.search_height = 750 / r.getStorageSync("windowWidth") * a.height, e.header_background = {
                                    backgroundColor: e.setting.waimaittnew_lunbobgcolor
                                }, e.swiper_color = e.setting.waimaittnew_lunbobgcolor, "all" == (a = n).mall_type ? (e.is_all = 1, 
                                e.navItems = r.getStorageSync("setting").index_malltype, e.mall_type = r.getStorageSync("setting").index_malltype[0].type, 
                                e.navType = r.getStorageSync("setting").index_malltype[0].type, e.navQuery = r.getStorageSync("setting").index_malltype[0].query) : (e.mall_type = a.mall_type, 
                                e.navType = a.mall_type), e.loadMallgoodslist(), r.setNavigationBarTitle({
                                    title: e.setting.waimaittnew_navigationBarTitleText
                                }), r.setNavigationBarColor({
                                    backgroundColor: e.setting.waimaittnew_navigationBarBackgroundColor,
                                    frontColor: e.setting.waimaittnew_navigationBarTextStyle
                                });

                              case 19:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }))();
                },
                onShareAppMessage: function() {
                    var t = "pagesA/pages/mallA/mallindex?uid=" + r.getStorageSync("userinfo").user_id + "&mall_type=" + mall_type;
                    return {
                        title: this.sharetitle,
                        imageUrl: this.sharepic,
                        path: t
                    };
                },
                methods: {
                    swiperchange: function(t) {
                        this.swiper_color = this.swiperItems[t].banner_color, this.header_background = {
                            backgroundColor: this.swiperItems[t].banner_color
                        }, r.setNavigationBarColor({
                            backgroundColor: this.swiperItems[t].banner_color,
                            frontColor: "#ffffff"
                        });
                    },
                    change_banner: function(t) {
                        this.current_bannerid = t, this.banner_color = this.ad_banner[t].banner_color;
                    },
                    search_blur: function() {
                        this.search_placeholder = this.setting.index_search_placeholder || "搜索商品标题，先领券再购买";
                    },
                    search_focus: function() {
                        this.search_placeholder = "";
                    },
                    toSearch: function(t) {
                        this.keyword = t, this.onSearch();
                    },
                    onSearch: function() {
                        "" != this.keyword.trim() ? this.getList("refresh", !0) : t.showToast({
                            title: "搜索内容不能为空",
                            duration: 2e3,
                            icon: "none"
                        });
                    },
                    tosearch: function(t) {
                        "" == this.keyword.trim() ? r.showToast({
                            title: "搜索内容不能为空",
                            duration: 2e3,
                            icon: "none"
                        }) : r.navigateTo({
                            url: "searchlist?keyword=" + t.trim() + "&mall_type=" + this.mall_type
                        });
                    },
                    clear: function() {
                        this.keyword = "";
                    },
                    openGoods: function(t) {
                        "youxuan" == t.currentTarget.dataset.pingtai ? r.navigateToMiniProgram({
                            appId: t.currentTarget.dataset.appid,
                            path: t.currentTarget.dataset.path
                        }) : r.navigateTo({
                            url: "detail?pt=" + t.currentTarget.dataset.pingtai + "&goodsid=" + t.currentTarget.dataset.goodsid + "&goodssign=" + t.currentTarget.dataset.goodssign + "&search_id=" + t.currentTarget.dataset.search_id
                        });
                    },
                    navChange: function(t) {
                        this.navchange = 1;
                        var e = this;
                        r.createSelectorQuery().select("#scroll").boundingClientRect(function(t) {
                            t && (e.fixed_heiht = t.height);
                        }).exec(), 100 < this.headerHeight && e.scrollTop >= this.headerHeight ? (this.isFixed = !0, 
                        this.nav_margin_top = r.getStorageSync("headerHeight") + "px", this.nav_padding_top = "15rpx") : (this.isFixed = !1, 
                        this.nav_margin_top = "15rpx", this.nav_padding_top = "0rpx");
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), this.scrollTop >= this.headerHeight && r.pageScrollTo({
                            scrollTop: this.headerHeight,
                            duration: 0
                        }), 1 == this.is_all ? (this.navIndex = t, this.navType = this.navItems[t].type, 
                        this.mall_type = this.navItems[t].type, this.navQuery = this.navItems[t].query, 
                        this.mallpage = 1, this.loadStatus = "loadmore", "youxuan" == this.navItems[t].type && r.getStorageSync("lon") && r.getStorageSync("lat") || "youxuan" != this.navItems[t].type ? this.loadMallgoodslist() : this.getLocation()) : (this.navIndex = t, 
                        this.cateid = this.navItems[t].id, this.navType = this.mall_type, this.mallpage = 1, 
                        this.loadStatus = "loadmore", this.loadMallgoodslist());
                    },
                    change: function(t) {
                        var e = this, a = this.tabBar.list[t];
                        if (this.pageKey = t, r.setStorageSync("pageKey", t), 1 == a.adtype) {
                            if (1 == a.appid_type && r.getStorageSync("mtwm_url")) return void r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtwm_url")
                            });
                            if (1 == a.appid_type && !r.getStorageSync("mtwm_url")) return e.appid_type = 1, 
                            void e.meituan_urlFun();
                            if (2 == a.appid_type && r.getStorageSync("mtsc_url")) return void r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtsc_url")
                            });
                            if (2 == a.appid_type && !r.getStorageSync("mtsc_url")) return e.appid_type = 2, 
                            void e.meituan_urlFun();
                            if (3 == a.appid_type && r.getStorageSync("elmwm_url")) return r.navigateToMiniProgram({
                                appId: "wxece3a9a4c82f58c9",
                                path: r.getStorageSync("elmwm_url")
                            }), e.updatepid(), void console.log(r.getStorageSync("elmwm_url"));
                            if (3 == a.appid_type && !r.getStorageSync("elmwm_url")) return e.appid_type = 3, 
                            void e.gettaobaoauth();
                            if (4 == a.appid_type && r.getStorageSync("elmsc_url")) return r.navigateToMiniProgram({
                                appId: "wxece3a9a4c82f58c9",
                                path: r.getStorageSync("elmsc_url")
                            }), e.updatepid(), void console.log(r.getStorageSync("elmsc_url"));
                            if (4 == a.appid_type && !r.getStorageSync("elmsc_url")) return console.log("ccc"), 
                            e.appid_type = 4, void e.gettaobaoauth();
                            if (0 == a.appid_type) return void r.navigateToMiniProgram({
                                appId: a.appid,
                                path: a.path
                            });
                        }
                        if (5 != a.adtype) {
                            if (4 == a.adtype) {
                                r.setStorageSync("index_nav", a.url);
                                var n = getCurrentPages();
                                n.reverse();
                                for (var i = a.url.replace("../", ""), o = 0; o < n.length; o++) if (-1 != n[o].route.indexOf(i)) return void r.navigateBack({
                                    delta: o
                                });
                                return -1 != a.url.indexOf("A") ? (i = a.url.replace("../../pagesA/pages/", "../"), 
                                r.navigateTo({
                                    url: i
                                }), void r.hideLoading()) : (i = a.url.replace("../", "../../../pages/"), r.navigateTo({
                                    url: i
                                }), void r.hideLoading());
                            }
                            2 != a.adtype && 3 != a.adtype || (e = d.globalData.util.url("entry/wxapp/api", {
                                m: d.globalData.module_name,
                                o: "ad_kefubind"
                            }), r.request({
                                url: e,
                                method: "POST",
                                header: {
                                    "content-type": "application/x-www-form-urlencoded"
                                },
                                data: {
                                    adtype: "ad",
                                    adid: a.item_id,
                                    openid: r.getStorageSync("openid")
                                },
                                success: function(t) {}
                            }), this.contact_title_desc = "", this.contact_type = "ad", this.contact_id = a.item_id, 
                            this.contact_title = a.title, this.contact_title_text = a.title_text, this.contact_title_desc = a.title_desc, 
                            this.contact_thumb = r.getStorageSync("setting").dianwo, this.showDialog3());
                        } else r.navigateTo({
                            url: "../../../pages/kefu/webview?return_url=" + encodeURIComponent(a.url) + "&t=" + Date.parse(new Date())
                        });
                    },
                    fatherHeight: function(t) {
                        this.height = t;
                    },
                    waimaidaohangchange: function(t) {
                        this.waimaidaohangcurrent = t.detail.current;
                    },
                    updatepid: function() {
                        var t = d.globalData.util.url("entry/wxapp/api", {
                            m: d.globalData.module_name,
                            o: "updatepid"
                        });
                        r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid")
                            },
                            success: function(t) {}
                        });
                    },
                    taped: function(t) {
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (t = this.swiperItems[t], 
                        this.openad(t)) : this.showDialog2();
                    },
                    taped_banner: function(t) {
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (t = this.ad_banner[t], 
                        this.openad(t)) : this.showDialog2();
                    },
                    loadMallgoodslist: function() {
                        var i, t;
                        "nomore" != this.loadStatus ? "youxuan" != (i = this).navType || 0 < r.getStorageSync("lat") && 0 < r.getStorageSync("lon") ? (i.loadStatus = "loading", 
                        t = d.globalData.util.url("entry/wxapp/mallindex", {
                            m: d.globalData.module_name
                        }), r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                type: i.mall_type,
                                cateid: i.cateid,
                                page: i.mallpage,
                                pagesize: i.mallpagesize,
                                lon: r.getStorageSync("lon"),
                                lat: r.getStorageSync("lat"),
                                is_all: i.is_all,
                                navchange: i.navchange,
                                system_type: r.getStorageSync("systemtype")
                            },
                            success: function(t) {
                                if (200 == t.data.code) {
                                    if (!i.navchange) {
                                        i.swiperItems = t.data.lunbo, 1 == t.data.waimaidaohang.length ? i.waimaidaohang_1 = t.data.waimaidaohang[0] : 2 == t.data.waimaidaohang.length ? (i.waimaidaohang_1 = t.data.waimaidaohang[0], 
                                        i.waimaidaohang_2 = t.data.waimaidaohang[1]) : 3 == t.data.waimaidaohang.length ? (i.waimaidaohang_1 = t.data.waimaidaohang[0], 
                                        i.waimaidaohang_2 = t.data.waimaidaohang[1], i.waimaidaohang_3 = t.data.waimaidaohang[2]) : 4 == t.data.waimaidaohang.length && (i.waimaidaohang_1 = t.data.waimaidaohang[0], 
                                        i.waimaidaohang_2 = t.data.waimaidaohang[1], i.waimaidaohang_3 = t.data.waimaidaohang[2], 
                                        i.waimaidaohang_4 = t.data.waimaidaohang[3]), i.waimailist = t.data.waimailist, 
                                        i.mall_nav = t.data.mall_nav, i.ad_banner = t.data.ad_banner, i.ad_banner_list = t.data.ad_banner_list, 
                                        i.ad_banner_list2 = t.data.ad_banner_list2, 0 < t.data.ad_banner.length && (i.banner_color = t.data.ad_banner[0].banner_color), 
                                        i.sharetitle = t.data.sharetitle, i.sharepic = t.data.sharepic, i.waimaittnew_daohang_height = t.data.waimaittnew_daohang_height, 
                                        1 == i.is_all ? i.mall_type_name = "" : i.mall_type_name = t.data.mall_type_name;
                                        for (var e = wx.getMenuButtonBoundingClientRect(), a = 0, n = 0; n < i.mall_type_name.length; n++) i.mall_type_name.charCodeAt(n) < 0 || 255 < i.mall_type_name.charCodeAt(n) ? a += 2 : a += 1;
                                        0 == (a /= 2) ? i.search_width = e.left - r.upx2px(100) + "px" : 2 == a ? i.search_width = e.left - r.upx2px(165) + "px" : 3 == a ? i.search_width = e.left - r.upx2px(200) + "px" : 4 == a && (i.search_width = e.left - r.upx2px(240) + "px"), 
                                        1 == i.is_all ? i.navItems = i.setting.index_malltype : i.navItems = t.data.cate;
                                    }
                                    e = t.data.mallgoodslist;
                                    1 == t.data.has_more ? i.loadStatus = "loadmore" : i.loadStatus = "nomore", i.mallpage = t.data.page, 
                                    1 == i.mallpage ? (i.mallpagesize = t.data.pagesize, i.mallgoodslist = [], i.mallgoodslist = e) : e && (i.mallgoodslist = i.mallgoodslist.concat(e)), 
                                    i.mallpage++;
                                }
                                r.hideLoading(), r.stopPullDownRefresh();
                            }
                        })) : i.getLocation() : r.hideLoading();
                    },
                    openShopad: function(t) {
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (t = t.currentTarget.dataset, 
                        this.api_url = t.item_id, this.openad(t)) : this.showDialog2();
                    },
                    openad: function(a) {
                        var t, n = this;
                        1 == a.is_warm && a.tplid ? (t = d.globalData.util.url("entry/wxapp/subscribemessage2", {
                            m: d.globalData.module_name
                        }), r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                id: a.item_id,
                                type: 2
                            },
                            success: function(t) {
                                var e;
                                r.setStorageSync("subscribemessage" + a.item_id, t.data.warm_daynum), r.getStorageSync("subscribemessage" + a.item_id) < a.tplid_oneday_num ? (e = new Array(), 
                                e = a.tplid.split(","), wx.requestSubscribeMessage({
                                    tmplIds: e,
                                    success: function(t) {
                                        "reject" == t[e[0]] || (t = d.globalData.util.url("entry/wxapp/subscribemessage2", {
                                            m: d.globalData.module_name
                                        }), r.request({
                                            url: t,
                                            method: "POST",
                                            header: {
                                                "content-type": "application/x-www-form-urlencoded"
                                            },
                                            data: {
                                                openid: r.getStorageSync("openid"),
                                                id: a.item_id,
                                                type: 1
                                            },
                                            success: function(t) {
                                                r.setStorageSync("subscribemessage" + a.item_id, t.data.warm_daynum);
                                            }
                                        })), n.openad2(a);
                                    },
                                    fail: function(t) {
                                        t.openad2(a);
                                    }
                                })) : n.openad2(a);
                            }
                        })) : n.openad2(a);
                    },
                    openad2: function(e) {
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var t, a, n = this;
                        1 == e.adtype ? 0 < e.appid_type2 ? (t = d.globalData.util.url("entry/wxapp/index_jump", {
                            m: d.globalData.module_name
                        }), r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                adid: e.item_id
                            },
                            success: function(t) {
                                1 == t.data.jump_type ? (r.navigateToMiniProgram({
                                    appId: t.data.jump_appid,
                                    path: t.data.jump_path
                                }), r.hideLoading()) : 2 == t.data.jump_type && (n.contact_type = "hotel", n.contact_id = e.item_id, 
                                n.contact_title = e.title, n.contact_title_text = e.title_text, n.contact_title_desc = e.title_desc, 
                                n.contact_thumb = r.getStorageSync("setting").dianwo, n.showDialog3(), r.hideLoading());
                            }
                        })) : (r.navigateToMiniProgram({
                            appId: e.appid,
                            path: e.path
                        }), r.hideLoading()) : 5 == e.adtype ? (r.navigateTo({
                            url: "../../../pages/kefu/webview?return_url=" + encodeURIComponent(e.url) + "&t=" + Date.parse(new Date())
                        }), r.hideLoading()) : 10 == e.adtype ? (this.$refs.addmini.showAddMiniProgramTips = 1, 
                        r.hideLoading()) : 11 == e.adtype || 7 == e.adtype ? r.hideLoading() : 4 == e.adtype ? (r.setStorageSync("index_nav", e.url), 
                        a = -1 != e.url.indexOf("A") ? e.url.replace("../../pagesA/pages/", "../") : e.url.replace("../", "../../../pages/"), 
                        r.navigateTo({
                            url: a
                        }), r.hideLoading()) : 2 == e.adtype || 3 == e.adtype || 9 == e.adtype ? (t = d.globalData.util.url("entry/wxapp/api", {
                            m: d.globalData.module_name,
                            o: "ad_kefubind"
                        }), r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                adtype: "ad_new",
                                adid: e.item_id,
                                openid: r.getStorageSync("openid")
                            },
                            success: function(t) {}
                        }), this.contact_title_desc = "", this.contact_type = "ad_new", this.contact_id = e.item_id, 
                        this.contact_title = e.title, this.contact_title_text = e.title_text, this.contact_title_desc = e.title_desc, 
                        this.contact_thumb = r.getStorageSync("setting").dianwo, r.hideLoading(), this.showDialog3()) : 8 == e.adtype ? 1 == e.mall_adtype ? r.navigateTo({
                            url: "huodong?id=" + e.item_id
                        }) : 2 == e.mall_adtype && this.loadMallapigoodslist(e) : 12 == e.adtype ? (r.previewImage({
                            urls: [ e.open_thumb ]
                        }), r.hideLoading()) : 13 == e.adtype && this.getCoupon(e);
                    },
                    getCoupon: function(e) {
                        var a = this;
                        if (r.getStorageSync("path" + e.item_id)) return r.getStorageSync("appid" + e.item_id) ? r.navigateToMiniProgram({
                            appId: r.getStorageSync("appid" + e.item_id),
                            path: r.getStorageSync("path" + e.item_id)
                        }) : r.setClipboardData({
                            data: r.getStorageSync("path" + e.item_id),
                            success: function(t) {
                                r.showToast({
                                    title: "内容已复制",
                                    icon: "success"
                                });
                            }
                        }), void r.hideLoading();
                        var t = d.globalData.util.url("entry/wxapp/mall_goods_getcoupon", {
                            m: d.globalData.module_name
                        });
                        r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                goodsid: e.goodsid,
                                pingtai: e.mall_type,
                                goodssign: e.goodssign,
                                search_id: a.search_id,
                                quan_url: e.quan_url,
                                uid: a.uid,
                                id: e.item_id
                            },
                            success: function(t) {
                                200 == t.data.code && ("tb" == e.mall_type ? (a.path = t.data.tkl, r.setStorageSync("path" + e.item_id, t.data.tkl), 
                                r.setStorageSync("pid_time", t.data.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setClipboardData({
                                    data: t.data.tkl,
                                    success: function(t) {
                                        r.showToast({
                                            title: "内容已复制",
                                            icon: "success"
                                        });
                                    }
                                })) : (a.appid = t.data.appid, a.path = t.data.path, r.setStorageSync("appid" + e.item_id, t.data.appid), 
                                r.setStorageSync("path" + e.item_id, t.data.path), r.navigateToMiniProgram({
                                    appId: t.data.appid,
                                    path: t.data.path
                                })), r.hideLoading());
                            }
                        });
                    },
                    loadMallapigoodslist: function(e) {
                        this.loadStatus = "loading";
                        var t = d.globalData.util.url("entry/wxapp/mallapigoodslist", {
                            m: d.globalData.module_name
                        });
                        r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                id: e.item_id,
                                lon: r.getStorageSync("lon"),
                                lat: r.getStorageSync("lat")
                            },
                            success: function(t) {
                                200 == t.data.code && (t.data.appid ? r.navigateToMiniProgram({
                                    appId: t.data.appid,
                                    path: t.data.path
                                }) : r.navigateTo({
                                    url: "huodong?id=" + e.item_id
                                })), r.hideLoading();
                            }
                        });
                    },
                    getLocation: function() {
                        var a = this;
                        r.getLocation({
                            type: "wgs84",
                            success: function(t) {
                                var e = d.globalData.util.url("entry/wxapp/address", {
                                    m: d.globalData.module_name
                                });
                                r.setStorageSync("lon", t.longitude), r.setStorageSync("lat", t.latitude), r.request({
                                    url: e,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        lon: t.longitude,
                                        lat: t.latitude
                                    },
                                    success: function(t) {
                                        r.setStorageSync("cityCode", t.data.data.cityCode), r.setStorageSync("city", t.data.data.city), 
                                        r.setStorageSync("cityid", t.data.data.ci), 0 < t.data.data.ci && 0 < r.getStorageSync("lat") ? a.loadMallgoodslist() : r.showModal({
                                            title: "系统提示",
                                            content: "请授权获取您的位置信息",
                                            showCancel: !0,
                                            success: function(t) {
                                                t.confirm && a.again_getLocation(), a.mallgoodslist = [], a.loadStatus = "nomore", 
                                                r.setStorageSync("lon", ""), r.setStorageSync("lat", ""), r.setStorageSync("cityCode", ""), 
                                                r.setStorageSync("city", ""), r.setStorageSync("cityid", ""), r.hideLoading();
                                            }
                                        });
                                    }
                                });
                            },
                            fail: function(t) {
                                a.mallgoodslist = [], a.loadStatus = "nomore", r.setStorageSync("lon", ""), r.setStorageSync("lat", ""), 
                                r.setStorageSync("cityCode", ""), r.setStorageSync("city", ""), r.setStorageSync("cityid", ""), 
                                r.hideLoading();
                            }
                        });
                    },
                    again_getLocation: function() {
                        var e = this;
                        r.getSetting({
                            success: function(t) {
                                null != t.authSetting["scope.userLocation"] && 1 != t.authSetting["scope.userLocation"] ? r.showModal({
                                    title: "是否授权当前位置",
                                    content: "需要获取您的地理位置，请确认授权，否则无法获取您所需数据",
                                    success: function(t) {
                                        t.cancel ? r.showToast({
                                            title: "授权失败",
                                            icon: "success",
                                            duration: 1e3
                                        }) : t.confirm && r.openSetting({
                                            success: function(t) {
                                                1 == t.authSetting["scope.userLocation"] ? (r.showToast({
                                                    title: "授权成功",
                                                    icon: "success",
                                                    duration: 1e3
                                                }), e.getLocation(e)) : r.showToast({
                                                    title: "授权失败",
                                                    icon: "success",
                                                    duration: 1e3
                                                });
                                            }
                                        });
                                    }
                                }) : (t.authSetting["scope.userLocation"], e.getLocation(e));
                            }
                        });
                    }
                }
            };
            i.default = n;
        }).call(this, c("543d").default);
    },
    "25ce": function(t, e, a) {
        (function(t) {
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            a("0cda"), e(a("66fd")), t(e(a("3b52")).default);
        }).call(this, a("543d").createPage);
    },
    "3b52": function(t, e, a) {
        a.r(e);
        var n, i = a("5ec5"), o = a("b690");
        for (n in o) "default" !== n && function(t) {
            a.d(e, t, function() {
                return o[t];
            });
        }(n);
        a("b217");
        var r = a("f0c5"), i = Object(r.a)(o.default, i.b, i.c, !1, null, null, null, !1, i.a, void 0);
        e.default = i.exports;
    },
    "5e19": function(t, e, a) {},
    "5ec5": function(t, e, a) {
        a.d(e, "b", function() {
            return i;
        }), a.d(e, "c", function() {
            return o;
        }), a.d(e, "a", function() {
            return n;
        });
        var n = {
            uNavbar: function() {
                return a.e("uview-ui/components/u-navbar/u-navbar").then(a.bind(null, "dffe"));
            },
            uSearch: function() {
                return a.e("uview-ui/components/u-search/u-search").then(a.bind(null, "6bb4"));
            },
            uTabsSwiper: function() {
                return Promise.all([ a.e("common/vendor"), a.e("uview-ui/components/u-tabs-swiper/u-tabs-swiper") ]).then(a.bind(null, "d492"));
            },
            uImage: function() {
                return a.e("uview-ui/components/u-image/u-image").then(a.bind(null, "871d"));
            },
            uLoading: function() {
                return a.e("uview-ui/components/u-loading/u-loading").then(a.bind(null, "54b5"));
            },
            uIcon: function() {
                return a.e("uview-ui/components/u-icon/u-icon").then(a.bind(null, "bee6"));
            },
            uGap: function() {
                return a.e("uview-ui/components/u-gap/u-gap").then(a.bind(null, "130d"));
            },
            uEmpty: function() {
                return a.e("uview-ui/components/u-empty/u-empty").then(a.bind(null, "b399"));
            },
            uButton: function() {
                return a.e("uview-ui/components/u-button/u-button").then(a.bind(null, "cad8"));
            },
            uLoadmore: function() {
                return a.e("uview-ui/components/u-loadmore/u-loadmore").then(a.bind(null, "2220"));
            },
            uBackTop: function() {
                return a.e("uview-ui/components/u-back-top/u-back-top").then(a.bind(null, "feb3"));
            }
        }, i = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    },
    b217: function(t, e, a) {
        var n = a("5e19");
        a.n(n).a;
    },
    b690: function(t, e, a) {
        a.r(e);
        var n, i = a("0744"), o = a.n(i);
        for (n in i) "default" !== n && function(t) {
            a.d(e, t, function() {
                return i[t];
            });
        }(n);
        e.default = o.a;
    }
}, [ [ "25ce", "common/runtime", "common/vendor" ] ] ]);